package cn.zjitc.design.principle.dependenceinversion;

public class Test {
    public static void main(String[] args) {
        /*//v1
        Tom tom = new Tom();
        tom.studyJavaCourse();
        tom.studyFECourse();*/

        /*//v2
        Tom tom = new Tom();
        tom.studyIMoocCourse(new JavaCourse());
        tom.studyIMoocCourse(new FECourse());*/

        /*//v3
        Tom tom = new Tom(new JavaCourse());
        tom.studyIMoocCourse();*/

        Tom tom = new Tom();
        tom.setiCourse(new JavaCourse());
        tom.studyIMoocCourse();
        tom.setiCourse(new FECourse());
        tom.studyIMoocCourse();
    }
}
